from abc import abstractmethod, ABC

class CompileAndRuner(ABC):
    @abstractmethod  # 编译
    def _compile(self, file_name):
        pass

    @abstractmethod  # 设置进程cpu和memory分配
    def _set_proc_limit(self, cpu_limit, mem_limit):
        pass

    @abstractmethod  # 运行
    def _run(self, file_name, cpu_limit, mem_limit):
        pass

    @abstractmethod  # 执行
    def start(self, in_obj):
        pass
